<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:a style="float:right;" href="javascript:showEditDialog('movie!add');">新建</s:a>
(<s:property value="paging.totalCount" />)
<br/>
<s:form action="movie!list" theme="simple">
	<input type="text" name="movie.name"/><input type="submit" value="搜索"/>
</s:form>

<!-- Paging starts -->
<s:a href="movie!list?paging.currentPage=1"> |< </s:a>
<s:if test="%{paging.currentPage>1}"><s:a href="movie!list?paging.currentPage=%{paging.currentPage-1}"> << </s:a></s:if>
<s:else><<</s:else>
&nbsp;&nbsp;<s:property value="paging.currentPage" />/<s:property value="paging.totalPage" />&nbsp;&nbsp;
<s:if test="%{paging.currentPage<paging.totalPage}"><s:a href="movie!list?paging.currentPage=%{paging.currentPage+1}">>></s:a></s:if>
<s:else>>></s:else>
<s:a href="movie!list?paging.currentPage=%{paging.totalPage}"> >| </s:a>
<!-- Paging ends -->

<table border="0" width="100%" style="background-color:green;" cellpadding="2" cellspacing="2" >
	<tr style="background-color: white; padding: 4px;">
		<th >
			#
		</th>
		<th>
			nameCn
		</th>
		<th>
			name
		</th>
		<th>
			上映
		</th>
		<th>
			届
		</th>
		<th>
			长度
		</th>
		<th>
			视频
		</th>
		<th>
			MTIME
		</th>
		<th>
			DOUBAN
		</th>
		<th>
			剧情
		</th>
		<th>
			MPRS
		</th>
		<th>
			MPACS
		</th>
	</tr>
	<s:iterator value="movies" status="stat">
	
		<tr style="background-color: white;">
			<td>
				<div style="width:40px; overflow:hidden;">
					<s:property value="#stat.count + (paging.currentPage-1)*50"/>
				</div>
			</td>
			<td>
				<div style="width:100px; overflow:hidden;white-space:nowrap;">
				<a href="javascript:showEditDialog('movie!edit?paging.currentPage=<s:property value="paging.currentPage" />&movie.id=<s:property value="id" />');">
					<s:property value="displayName" escape="false"/>
				</a>
				</div>
			</td>
			<td>
				<div style="width:100px; overflow:hidden;white-space:nowrap;">
				<s:property value="name" escape="false"/>
				</div>
			</td>
			<td <s:if test="calendar.year-datetimeYear>1 || calendar.year-datetimeYear<1">bgcolor="red"</s:if>>
				<s:property value="displayDatetime" escape="false"/>
			</td>
			<td>
				
				<s:property value="calendar.displayName" escape="false"/>
			</td>
			
			<td <s:if test="length==0">bgcolor="red"</s:if>>
				<s:property value="length" escape="false"/>
			</td>
			<td <s:if test="videos.size==0">bgcolor="red"</s:if>>
				<s:property value="videos.size" escape="false"/>
			</td>
			<td <s:if test="mtimeId>=0">bgcolor="red"</s:if>>
				<a target="_blank" href="http://movie.mtime.com/<s:if test="mtimeId<0"><s:property value="-mtimeId" escape="false"/></s:if><s:else><s:property value="mtimeId" escape="false"/></s:else>"/>
					<s:property value="mtimeId" escape="false"/>
				</a>
			</td>
			<td <s:if test="doubanId==0">bgcolor="red"</s:if>>
				<s:property value="doubanId" escape="false"/>
			</td>
			<td <s:if test="plot==null">bgcolor="red"</s:if>>
				
			</td>
			<td <s:if test="mprs.size==0">bgcolor="red"</s:if>>
				<s:iterator value="mprs" status="stat">
					<s:property value="#stat.count"/>: <s:property value="person.displayName" escape="false"/><br>
				</s:iterator>
			</td>
			<td <s:if test="mpacs.size==0">bgcolor="red"</s:if>>
				<s:iterator value="mpacs" status="stat">
					<s:property value="#stat.count"/>: <s:property value="award.nameCn" escape="false"/> - <s:property value="typeName" escape="false"/><br>
				</s:iterator>
			</td>
		</tr>
	
	</s:iterator>
</table>